<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>4-元素的显示与隐藏</title>
    <style>
        body p:nth-of-type(1){
            display: none;
        }
        body p:nth-of-type(2){
            visibility: hidden;
        }
        div{
            width: 500px;
            height:500px;
            border: 1px solid red;
        }
        div:hover img{
            display: none;
        }
    </style>
</head>
<body>
    <!-- 
        1)
            display:block[显示]/none[隐藏];
            display:none;在网页中不占位置，简单理解删除标签了  v[推荐]
        2)
            visiblity:hidden;  在网页中占位置，内容隐藏了
     -->
    <p>西安</p>
    <p>北京</p>
    <div>
        <img src="images/200.png" alt="">
    </div>

</body>
</html>